﻿'/*
'openEco grasshopper components 0.000.1
'ben howes  110811
' */
 
 Imports Grasshopper.Kernel
 Imports Grasshopper.Kernel.Types
 Imports Rhino.Geometry
 
 
 Public Class EcotectLink
 	Inherits GH_Component
 	
 	''add new constructor
 	Public Sub New()
 		''for sharpDevelop users ...  don't know why intellisense doesn't work with the new constructor..
 		''MyBase.New("Component Name", "Component Abbreviation", "Description", "Category", "Sub-Category")

		MyBase.New("Ecotect Link", "Eco", "Creates the link to Ecotect", "OpenEco", "Link")

 	End Sub

	Protected Overrides Sub SolveInstance(DA As IGH_DataAccess)

		Dim startBool As Boolean = Nothing
		
		If (Not DA.GetData(0, startBool)) Then Return
		If (startBool = Nothing) Then Return
	
		If (startBool = True) Then
			MsgBox("Start Ecotect and press OK")
		End If
		
		
	End Sub
 	
 	Protected Overrides Sub RegisterOutputParams(pManager As GH_Component.GH_OutputParamManager)
 		pManager.Register_StringParam("Error message", "Err", "Error thrown by OpenEco")
	End Sub
 	
	Protected Overrides Sub RegisterInputParams(pManager As GH_Component.GH_InputParamManager)
		pManager.Register_BooleanParam("Ecotect Link", "E", "True = Start Ecotect and link GH to Ecotect", False)
	End Sub
 	
	Public Overrides ReadOnly Property ComponentGuid() As System.Guid
		Get
			''TO DO: CREATE A LEGIT GUID!!
			Return New Guid("fa77cb9d-272f-4846-82df-1bf1fd8ddd69")
		End Get
	End Property
	
	
End Class
